home *** CD-ROM | disk | FTP | other *** search
- function firebomb()
- {
- removeMovieClip("weaponselector");
- player2.gunturretindicator._visible = false;
- player1.gunturretindicator._visible = false;
- if(explosiontype == 1)
- {
- if(turn == "player1")
- {
- player1cash -= weaponcost;
- }
- else
- {
- player2cash -= weaponcost;
- }
- action = "jetpacing player";
- }
- else if(explosiontype == 5)
- {
- if(turn == "player1")
- {
- player1cash -= weaponcost;
- player1shield = 3;
- action = "end turn";
- }
- else
- {
- player2cash -= weaponcost;
- player2shield = 3;
- action = "end turn";
- }
- shieldsound.start(0,0);
- rotateplayers();
- }
- if(explosiontype > 1 && explosiontype < 5)
- {
- gunsound.start();
- if(turn == "player1")
- {
- this.player1.bot.gun.muzzleflash.play();
- player1cash -= weaponcost;
- }
- else
- {
- this.player2.bot.gun.muzzleflash.play();
- player2cash -= weaponcost;
- }
- leftv = 0;
- rightv = 0;
- temppower = power / 2.5;
- radian = rottemp * 3.141592653589793 / 180;
- xmove = temppower * Math.cos(radian);
- if(xmove > 0)
- {
- rightv = xmove;
- }
- else
- {
- leftv = Math.abs(xmove);
- }
- upv = temppower * Math.sin(radian);
- adjustx = 45 * Math.cos(radian);
- adjusty = 8 + 45 * Math.sin(radian);
- if(turn == "player1")
- {
- bx = p1x + adjustx;
- by = p1y + adjusty;
- }
- else
- {
- bx = p2x + adjustx;
- by = p2y + adjusty;
- }
- if(player1cash < 0)
- {
- player1cash = 0;
- }
- if(player2cash < 0)
- {
- player2cash = 0;
- }
- player1cashreport = "$" + player1cash;
- player2cashreport = "$" + player2cash;
- action = "movebomb";
- }
- }
-